from .xception import aligned_xception
from .resnet import ResNet101
from .mobilenet import MobileNetV2


def build_backbone(backbone, output_stride, norm_layer=None):
    if backbone == 'resnet':
        return ResNet101(output_stride, norm_layer)
    elif backbone == 'xception':
        return aligned_xception(output_stride=output_stride)
    elif backbone == 'mobilenet':
        return MobileNetV2(output_stride, norm_layer)
    else:
        raise NotImplementedError
